<template>
  <q-page padding>
    <iframe
      ref="iframe"
      :src="$route.meta.redirect"
      marginwidth="0"
      marginheight="0"
      frameborder="0"
      width="100%"
      height="800"
    ></iframe>
  </q-page>
</template>

<script>
import { defineComponent } from "vue";

export default defineComponent({
  name: "redirectComp",
});
</script>

<script setup>
import { useRoute } from "vue-router";

const route = useRoute();

if (route.meta.redirect && route.meta.redirect.startsWith("RedirectTo:")) {
  console.log("red");
  const url = route.meta.redirect.substr(11);
  console.log(url);
  window.open(url, "_blank");
}
</script>

<style lang="scss" scoped></style>
